package com.pur.zsms.ordercustommanage.service;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import org.apache.commons.beanutils.BeanUtils;

import com.pur.zsms.common.exception.GenericException;
import com.pur.zsms.common.support.PageController;
import com.pur.zsms.common.support.PaginationSupport;
import com.pur.zsms.common.util.CipherUtil;
import com.pur.zsms.foodmanage.food.po.FoodMaterPo;
import com.pur.zsms.foodmanage.food.vo.FoodVo;
import com.pur.zsms.matermanage.mater.po.MaterLevelPo;
import com.pur.zsms.matermanage.mater.po.MaterPo;
import com.pur.zsms.ordercustommanage.po.OrderCustPo;
import com.pur.zsms.ordercustommanage.po.OrderSupplierMaterPo;
import com.pur.zsms.ordercustommanage.po.OrderSupplierMaterRealPo;
import com.pur.zsms.ordercustommanage.po.OrderSupplierPo;
import com.pur.zsms.ordercustommanage.vo.OrderCustFoodVo;
import com.pur.zsms.ordercustommanage.vo.OrderCustVo;
import com.pur.zsms.ordercustommanage.vo.OrderStateVo;
import com.pur.zsms.ordercustommanage.vo.OrderSupplierMaterRealVo;
import com.pur.zsms.ordercustommanage.vo.OrderSupplierVo;
import com.pur.zsms.ordercustommanage.vo.SelectFoodList;
import com.pur.zsms.ordercustommanage.vo.SelectFoodVo;
import com.pur.zsms.ordercustommanage.vo.SelectMaterVo;
import com.pur.zsms.pmsnmanage.menu.po.MenuPo;
import com.pur.zsms.pmsnmanage.role.vo.RoleVo;
import com.pur.zsms.pmsnmanage.user.po.UserPo;
import com.pur.zsms.pmsnmanage.user.vo.UserVo;
import com.pur.zsms.supplier.po.ShopSupplierTypePo;

public interface ISelectFoodService {
	String msg = "";

	public String getMsg();

	public void setMsg(String msg);

	public int addOrder(List<SelectFoodVo> selectFoodList, UserPo po) throws GenericException;

	public OrderCustPo addMaterOrder(List<SelectMaterVo> selectMaterList, long shopId) throws GenericException;

	/**
	 * 自采 增加审核订单
	 * */
	public int addMaterOrderForSelfForunusual(List<SelectMaterVo> selectMaterList, UserPo po) throws GenericException;

	public int addMaterOrderForSelf(List<SelectMaterVo> selectMaterList, long shopId) throws GenericException;

	public void deleteSupOrderByOid(int ordid) throws GenericException;

	public void updateMaterOrder(List<SelectMaterVo> selectMaterList, int ordId) throws GenericException;

	public void updateMaterOrderForSelf(int ordId) throws GenericException;

	public void deleteOrder(int ordId) throws GenericException;

	public int findInsertId() throws GenericException;

	public PaginationSupport listMyOrder(PageController pageController, OrderCustVo orderCustVo) throws GenericException;

	public PaginationSupport findEveryOrderState(PageController pageController, OrderStateVo orderStateVo) throws GenericException;

	public PaginationSupport listAllOrderForpurchase(PageController pageController, OrderCustVo orderCustVo) throws GenericException;

	public PaginationSupport reviewOrderList(PageController pageController, OrderCustVo orderCustVo) throws GenericException;

	public void passOrder(OrderCustVo c) throws GenericException;

	public void nopassOrder(OrderCustVo c) throws GenericException;

	public void passOrderValueForPurchase(OrderSupplierVo c) throws GenericException;

	public void passMaterOrder(OrderCustVo c) throws GenericException;

	public OrderCustVo getOrderCust(String c) throws GenericException;

	public SelectMaterVo getOrderCustForUpdateSelect(int ordId) throws GenericException;

	public boolean judgeFoodOrMaterHtml(String ordId) throws GenericException;

	public List<OrderCustFoodVo> getOrderCustFood(String c) throws GenericException;

	public List<OrderSupplierMaterPo> getOrderSupplierMaterPoByFoodIdAndMateridAndOid(String foodId, String materId, String ordId)
			throws GenericException;

	public List<OrderSupplierMaterPo> getOrderSupplierMaterPoByMateridOrdId(int materId, int ordId) throws GenericException;

	public List<OrderSupplierMaterPo> getOrderSupplierMaterPoByMateridOrdId(int materId, int ordId, int supid) throws GenericException;

	/**
	 * 校验发货用
	 * */
	public boolean getOrderSupplierPoByOrdIdForCheck(String ordId) throws GenericException;

	/**
	 * 校验发货用
	 * */
	public boolean getOrderSupplierPoByOrdIdAndSupIdForCheck(String ordId, String supId) throws GenericException;

	public List<OrderSupplierPo> getOrderSupplierPoByOrdId(String ordId) throws GenericException;

	public List<OrderSupplierPo> getOrderSupplierPoByOrdIdAndSupId(String ordId, String supId) throws GenericException;

	public List<OrderSupplierPo> getOrderSupplierPoByOrdDateAndSupId(String ordDate, int supId) throws GenericException;

	public List<OrderSupplierPo> getOrderSupplierPoByOrdDateAndSupIdAndShopId(String ordDate, int supId, long shopId) throws GenericException;

	public List<FoodMaterPo> getFootMaterByFoodId(int c) throws GenericException;

	public MaterPo getMaterValueByMaterId(int c) throws GenericException;

	public MaterLevelPo getMaterLevelByMaterIdAndLevel(int c, int level) throws GenericException;

	public MaterLevelPo getMaterLevelByMaterId(int c) throws GenericException;

	public ShopSupplierTypePo getSuppCusPoByMaterType(int c, int userId) throws GenericException;

	public List<Object[]> getOrderSupplierMaterByOrdId(String ordId) throws GenericException;

	public List<Object[]> getOrderSupplierMaterByOrdIdAndSupIdAndShopId(String ordId, long supId, long shopId) throws GenericException;

	public void addOrderSupplierMater(OrderSupplierMaterPo orderSupplierMaterPo) throws GenericException;

	public boolean addOrderSupplierMaterReal(List<OrderSupplierMaterRealVo> orderSupplierMaterRealVoList) throws GenericException;

	public boolean addOrderSupplierMaterReal(List<OrderSupplierMaterRealVo> orderSupplierMaterRealVoList, int ordId) throws GenericException;

	public boolean addOrderSupplierMaterRealForSelf(List<OrderSupplierMaterRealVo> orderSupplierMaterRealVoList) throws GenericException;

	public boolean addOrderSupplierMaterRealForUpdate(List<OrderSupplierMaterRealVo> orderSupplierMaterRealVoList) throws GenericException;

	public boolean addOrderSupplierMaterRealForSelfUpdate(List<OrderSupplierMaterRealVo> orderSupplierMaterRealVoList) throws GenericException;

	/**
	 * 提交真实材料时
	 * */
	public boolean updateOrderSupplierMaterReal(List<OrderSupplierMaterRealVo> orderSupplierMaterRealVoList, String ordDate) throws GenericException;

	public boolean addOrderSupplierMaterNeed(List<OrderSupplierMaterRealVo> orderSupplierMaterRealVoList) throws GenericException;

	public void updateOrderSupplierMater(OrderSupplierMaterPo orderSupplierMaterPo) throws GenericException;

	public void addOrderSupplier(OrderSupplierPo orderSupplierPo) throws GenericException;

	public void updateOrderSupplier(OrderSupplierPo orderSupplierPo) throws GenericException;

	/**
	 * 增加校验 校验这个菜品 中的材料是否 满足 此店长对应供货商
	 * */
	public boolean checkMaterIsInUseSup(List<SelectFoodVo> list, UserPo po) throws GenericException;

	/**
	 * 增加校验 校验客户每日提交材料仅为1次
	 * */
	public int checkCommitMaterOrder(String orderDate, long userId, int buySelfFlag) throws GenericException;

	/**
	 * 增加校验 校验供货商每日提交材料仅为1次
	 * */
	public int checkCommitMaterOrderForSup(String orderDate, long shopId, long supId) throws GenericException;

	/**
	 * 增加校验 校验是否提交过真实送货数量
	 * */
	public boolean checkCommitDeliverState(int ordId, int ordSupId) throws GenericException;

}
